package com.haiheng.library_base.db

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import java.util.*

/**
 *
 * @Des:
 * @Author: hwz
 * @Date:2022/5/25 0025
 * @Version: 1.0
 */
@Entity(tableName = "record_table")
data class RecordTable(

    @PrimaryKey(autoGenerate = true)
    val id: Long = 0,
    //记录类型 借书：BORROW_BOOK  还书：RETURN_BOOK  续借：RENEW_BOOK
    @ColumnInfo(name = "recordType")
    var recordType: String? = null,
    //状态 0: 成功 -1 ：失败
    @ColumnInfo(name = "status")
    var status: Int = -1,
    //读者账号
    @ColumnInfo(name = "patronSn")
    var patronSn: String? = null,
    //条码号
    @ColumnInfo(name = "bookSn")
    var bookSn: String? = null,
    //书名
    @ColumnInfo(name = "bookTitle")
    var bookTitle: String? = null,
    //记录时间
    @ColumnInfo(name = "createDate")
    var createDate: Date = Date(),
    @ColumnInfo(name = "message")
    var message: String? = null,
    @ColumnInfo(name = "errorCode")
    var errorCode: String? = null,
    //请求id
    @ColumnInfo(name = "requestId")
    var requestId: String? = null,
)